package com.zhuoyue.system.service.impl;

import java.util.List;

import com.zhuoyue.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhuoyue.system.mapper.TblGatewayZyMapper;
import com.zhuoyue.system.domain.TblGatewayZy;
import com.zhuoyue.system.service.ITblGatewayZyService;

/**
 * gatewayZYService业务层处理
 *
 * @author hewenze
 * @date 2020-09-08
 */
@Service
public class TblGatewayZyServiceImpl implements ITblGatewayZyService {
    @Autowired
    private TblGatewayZyMapper tblGatewayZyMapper;

    /**
     * 查询gatewayZY
     *
     * @param id gatewayZYID
     * @return gatewayZY
     */
    @Override
    public TblGatewayZy selectTblGatewayZyById(Long id) {
        return tblGatewayZyMapper.selectTblGatewayZyById(id);
    }

    /**
     * 查询gatewayZY列表
     *
     * @param tblGatewayZy gatewayZY
     * @return gatewayZY
     */
    @Override
    public List<TblGatewayZy> selectTblGatewayZyList(TblGatewayZy tblGatewayZy) {
        return tblGatewayZyMapper.selectTblGatewayZyList(tblGatewayZy);
    }

    /**
     * 新增gatewayZY
     *
     * @param tblGatewayZy gatewayZY
     * @return 结果
     */
    @Override
    public int insertTblGatewayZy(TblGatewayZy tblGatewayZy) {
        tblGatewayZy.setCreateTime(DateUtils.getNowDate());
        return tblGatewayZyMapper.insertTblGatewayZy(tblGatewayZy);
    }

    /**
     * 修改gatewayZY
     *
     * @param tblGatewayZy gatewayZY
     * @return 结果
     */
    @Override
    public int updateTblGatewayZy(TblGatewayZy tblGatewayZy) {
        return tblGatewayZyMapper.updateTblGatewayZy(tblGatewayZy);
    }

    /**
     * 批量删除gatewayZY
     *
     * @param ids 需要删除的gatewayZYID
     * @return 结果
     */
    @Override
    public int deleteTblGatewayZyByIds(Long[] ids) {
        return tblGatewayZyMapper.deleteTblGatewayZyByIds(ids);
    }

    /**
     * 删除gatewayZY信息
     *
     * @param id gatewayZYID
     * @return 结果
     */
    @Override
    public int deleteTblGatewayZyById(Long id) {
        return tblGatewayZyMapper.deleteTblGatewayZyById(id);
    }
}
